package jp.co.jbuy.db.query;
public abstract class Query {


    protected java.sql.ResultSet result_ = null;

    protected java.sql.PreparedStatement statement_ = null;

    public boolean next()
        throws java.sql.SQLException {

        return result_.next();
    }


    public void close()
        throws java.sql.SQLException {

        if (result_ != null){
            result_.close();
            result_ = null;
        }

        if (statement_ != null){
            statement_.close();
            statement_ = null;
        }
    }



    protected static final boolean toBool(int n){
        if (n != 0){
            return true;
        } else {
            return false;
        }
    }


    protected static final String trim(String str){
        if (str == null){
            return "";
        } else {
            return str.trim();
        }
    }

}
